import Vue from 'vue';

// 聚焦元素
const focus = Vue.directive('focus', {
  inserted: function(el) {
    el.focus();
  }
});
// 提示 [测试]
const tip = Vue.directive('tip', {
  inserted: function(el, binding, vnode) {
    console.log(el);
    console.log(binding);
    console.log(vnode);
  }
});
const directive = {
  focus,
  tip
};
export default directive;